import request from '@/utils/request'

// 获取组织架构

export function getDepartment(){
  return request({
    url:"/mydept/department"
  })
}

/**
 * 获取负责人接口
 */
export function getManageList(){
  return request({
    url:'/mydept/options'
  })
}

/**
 * 新增组织
 * ***/
export function addDepartment(data) {
  return request({
    method: 'post',
    url: '/mydept',
    data
  })
}

/**
 * 获取部门详情
 *
 * ***/

export function getDepartmentDetail(id) {
  return request({
    url: `/mydept/${id}/form`
  })
}


/** *
 * 更新部门
 * ***/
export function updateDepartment(data) {
  return request({
    method: 'post',
    url: '/mydept',
    data
  })
}

/**
 * 删除部门
 *
*/
export function delDepartment(id) {
  return request({
    method: 'delete',
    url: `/mydept/${id}`
  })
}


